package com.visizen.wisdomclass.server.client;

import com.visizen.wisdomclass.server.model.WcTopicTop;
import com.visizen.wisdomclass.server.model.WcTopicTopExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WcTopicTopMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_top
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcTopicTopSqlProvider.class, method="countByExample")
    int countByExample(WcTopicTopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_top
     *
     * @mbggenerated
     */
    @DeleteProvider(type=WcTopicTopSqlProvider.class, method="deleteByExample")
    int deleteByExample(WcTopicTopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_top
     *
     * @mbggenerated
     */
    @Delete({
        "delete from wc_topic_top",
        "where topic_top_id = #{topic_top_id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long topic_top_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_top
     *
     * @mbggenerated
     */
    @Insert({
        "insert into wc_topic_top (topic_top_id, topic_id, ",
        "discuss_id, create_time, ",
        "expiration_time)",
        "values (#{topic_top_id,jdbcType=BIGINT}, #{topic_id,jdbcType=BIGINT}, ",
        "#{discuss_id,jdbcType=BIGINT}, #{create_time,jdbcType=TIMESTAMP}, ",
        "#{expiration_time,jdbcType=TIMESTAMP})"
    })
    int insert(WcTopicTop record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_top
     *
     * @mbggenerated
     */
    @InsertProvider(type=WcTopicTopSqlProvider.class, method="insertSelective")
    int insertSelective(WcTopicTop record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_top
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcTopicTopSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="topic_top_id", property="topic_top_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="topic_id", property="topic_id", jdbcType=JdbcType.BIGINT),
        @Result(column="discuss_id", property="discuss_id", jdbcType=JdbcType.BIGINT),
        @Result(column="create_time", property="create_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="expiration_time", property="expiration_time", jdbcType=JdbcType.TIMESTAMP)
    })
    List<WcTopicTop> selectByExample(WcTopicTopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_top
     *
     * @mbggenerated
     */
    @Select({
        "select",
        "topic_top_id, topic_id, discuss_id, create_time, expiration_time",
        "from wc_topic_top",
        "where topic_top_id = #{topic_top_id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="topic_top_id", property="topic_top_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="topic_id", property="topic_id", jdbcType=JdbcType.BIGINT),
        @Result(column="discuss_id", property="discuss_id", jdbcType=JdbcType.BIGINT),
        @Result(column="create_time", property="create_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="expiration_time", property="expiration_time", jdbcType=JdbcType.TIMESTAMP)
    })
    WcTopicTop selectByPrimaryKey(Long topic_top_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_top
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcTopicTopSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WcTopicTop record, @Param("example") WcTopicTopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_top
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcTopicTopSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WcTopicTop record, @Param("example") WcTopicTopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_top
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcTopicTopSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WcTopicTop record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_top
     *
     * @mbggenerated
     */
    @Update({
        "update wc_topic_top",
        "set topic_id = #{topic_id,jdbcType=BIGINT},",
          "discuss_id = #{discuss_id,jdbcType=BIGINT},",
          "create_time = #{create_time,jdbcType=TIMESTAMP},",
          "expiration_time = #{expiration_time,jdbcType=TIMESTAMP}",
        "where topic_top_id = #{topic_top_id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(WcTopicTop record);
}